<?php
namespace app\admin\model;

use think\Model;

class CardShop extends Base
{
    protected $name = 'card_shop';

    public function getAdminIdAttr($val){
        return (new Admin())->getFind(['id' => $val])['data'];
    }

    public function getTypeAttr($val){
        $type = [1 => '无限制', 2 => '分类', 3 => '指定商品'];
        return $type[$val];
    }
}